package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.workbench.domain.dto.req.goods.CreateOrUpdateGoodsReq;
import com.sikaryofficial.workbench.domain.dto.resp.goods.GoodsManageDetailDTO;
import com.sikaryofficial.workbench.domain.entity.PriceTier;
import com.sikaryofficial.workbench.domain.eo.PriceTierEO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface PriceTierMapping {

    PriceTierMapping INSTANCE = Mappers.getMapper(PriceTierMapping.class);

    /*------------------商品管理---------------*/
    PriceTier convertToEntity(CreateOrUpdateGoodsReq.PriceTier priceTier);

    List<GoodsManageDetailDTO.PriceTier> covertToDTOList(List<PriceTier> priceTierList);
    GoodsManageDetailDTO.PriceTier covertToDTO(PriceTier priceTier);

    List<PriceTier> convertToEntityListByEO(List<PriceTierEO> priceTierEOS);
    PriceTier convertToEntityByEO(PriceTierEO priceTierEO);

    List<PriceTierEO> covertToEOList(List<PriceTier> priceTierList);
}
